4304953353e7de0782bcc903f15e2d272e5ba81f,test/src/org/cacheonix/impl/cache/store/BinaryStoreTest.java,BinaryStoreTest,createBinaryStore,#,162
Before Change
keyStore.setDataSource(new DummyBinaryStoreDataSource());
keyStore.setDataStore(new DummyDataStore());
keyStore.attachToByteCounter(new SharedCounter(0L));
keyStore.attachToElementCounter(new SharedCounter(MAX_SIZE));
return keyStore;
}
After Change
private BinaryStore createBinaryStore() {
// Test context
final BinaryStoreContext context = new BinaryStoreContextImpl();
context.setObjectSizeCalculator(new DummyObjectSizeCalculator());
context.setDiskStorage(new DummyDiskStorage(DISK_STORAGE_NAME + "-deserialized"));
context.setDataSource(new DummyBinaryStoreDataSource());
context.setInvalidator(new DummyCacheInvalidator());
context.setDataStore(new DummyDataStore());
final BinaryStore keyStore = new BinaryStore(getClock(), Integer.MAX_VALUE, Integer.MAX_VALUE);
keyStore.attachToElementCounter(new SharedCounter(MAX_SIZE));
keyStore.attachToByteCounter(new SharedCounter(0L));
keyStore.setContext(context);
return keyStore;
}